<?php use application\Comm\Func;?>
<div class="bjui-pageContent">
    <form action="<?php echo Func::createUrl('article/editdo',['id'=>$data['id']]);?>"id="editForm" class="pageForm" data-toggle="validate"
          data-reload-navtab="true">
        <table class="table table-condensed table-hover" width="100%">
            <tbody>
            <tr>
                <td colspan="2">
                    <label class="control-label x100">名称：</label>
                    <input id="name" type="text" name="info[name]" value="<?php echo $data['name']?>" size="60" data-rule="required;"/>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <label class="control-label x100">分类：</label>
                    <select name="info[category_id]" data-toggle="selectpicker" <?php echo $data['category_id']?> data-width="300">
                        <?php foreach($category as $k => $v){?>
                            <option <?php if($data['category_id']==$k)echo 'selected="selected"';?> value="<?php echo $k?>"><?php echo $v?></option>
                        <?php }?>
                    </select>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <label class="control-label x100">链接：</label>
                    <input class="" id="username" type="text" name="info[url]" value="<?php echo $data['url']?>"
                           size="60"/>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <label class="control-label x100">描述：</label>
                    <textarea name="info[description]" style="width:784px;height:50px" data-toggle="autoheight"></textarea>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <label class="control-label x100">详情：</label>
                    <div style="display: inline-table">
                    <textarea style="width: 784px" name="info[content]" data-toggle="kindeditor" data-autoHeightMode="true"
                              data-items="'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
        'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
        'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
        'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
        'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
        'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'multiimage',
        'flash', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
        'anchor', 'link', 'unlink', '|'" data-upload-json="<?php echo Func::createUrl('site/uploadkindedit')?>">
                    <?php echo $data['content']?>
                    </textarea>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <label class="control-label x100">状态：</label>
                    <select name="info[status]" data-toggle="selectpicker" data-width="300">
                        <option <?php echo $data['status']==0?'selected="selected"':'';?> value="0">隐藏</option>
                        <option <?php echo $data['status']==1?'selected="selected"':'';?> value="1">显示</option>
                    </select>
                </td>
            </tr>


            </tbody>
        </table>
    </form>
</div>

<div class="bjui-pageFooter">
    <ul>
        <li>
            <button type="button" class="btn-close" data-icon="close">关闭</button>
        </li>
        <li>
            <button type="submit" class="btn btn-blue" data-icon="save">保存</button>
        </li>
    </ul>
</div>